Skip to main content

Replace column value

Use the Replace column value transformation to replace the values in the source columns (set in the Transformation scope) with different values in the corresponding target columns.

The following options are available:

  • Replace target value with - Create an expression for replacing the value in the source column values with a different value in the target columns. When you click the fx button to the right of the field, the Expression Builder opens showing the Data tab. For an explanation of the variables in this tab, see Data (global transformations only).

    Example:  

    The following expression appends the string "_new" to the original source column values.

    $AR_M_SOURCE_COLUMN_DATA || '_new'

  • Set target data type to - If you change the target value type (e.g. string to numeric), you may also need to change the data type of the target columns as well.

    For the BYTES, STRING, and WSTRING data types, you can optionally specify the Length as well. If you leave the default value ("0"), Replicate will calculate the data type length based on the source column definition. You can also set the length using an expression. When you click the fx button to the right of the Length field, the Expression Builder opens showing the Metadata tab. For an explanation of the variables in this tab, see Metadata (Global transformations only).

    Example:  

    The following expression multiplies the modified data type length by two.

    $AR_M_MODIFIED_DATATYPE_LENGTH * 2

     

    For the NUMERIC data type, you can optionally set the Precision and Scale. If you leave the default value ("0"), Replicate will calculate the precision and/or scale based on the source column value.

  • Subtype: When CLOB, NCLOB, STRING, or WSTRING data types are selected, you can also set a data subtype. Select either JSON or XML from the Subtype drop-down list. Make sure that the new data in the column will be compatible with the selected subtype. The default is Regular, which means that the regular data type will be used without a subtype.

See also: Using the Expression Builder

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!